Delegate TopicConfig.Partitioner

The partitioner may be called in any thread at any time, it may be called multiple times for the same message/key.

Partitioner function constraints:

  • MUST NOT call any RdKafka methods except forPartitionAvailable(Int32)
  • MUST NOT block or execute for prolonged periods of time.
  • MUST return a value between 0 and partition_cnt-1, or the special RdKafka.Topic.RD_KAFKA_PARTITION_UA value if partitioning could not be performed.
Namespace:RdKafka
Assembly:cs.temp.dll.dll
Syntax
public delegate int Partitioner(Topic topic, byte[] key, int partitionCount);